import  request from '@/utils/request'

export default {

  addCourseInfo(courseInfo) {
    return request({
      url: '/edu/course/addCourse',
      method: 'post',
      data:courseInfo
    })
  },
  getAllTeacher() {
    return request({
      url: '/eduservice/teacher/select',
      method: 'get'
    })
  },
  getCourseInfo(id) {
    return request({
      url: '/edu/course/getCourseInfo/' + id,
      method: 'get'
    })
  },
  updateCourseInfo(courseInfoVo) {
    return request({
      url: '/edu/course/updateCourseInfo',
      method: 'post',
      data:courseInfoVo
    })
  },
  getPublishCourseInfo(id) {
    return request({
      url: '/edu/course/getPublishCourseInfo/' + id,
      method: 'get'
    })
  },
  publishCourse(courseId) {
    return request({
      url: '/edu/course/publishCourse/' + courseId,
      method: 'post'
    })
  },
  getCoursePageList(current, limit, courseQuery) {
    return request({
      url: `/edu/course/pageCourseCondition/${current}/${limit}`,
      method: 'post',
      data: courseQuery
    })
  },
  deleteCourse(courseId) {
    return request({
      url: '/edu/course/deleteCourse/' + courseId,
      method: 'delete'
    })
  },

}
